gdkwindow: Handle references in "update_windows" list correctly
authorMarek Kasik <mkasik@redhat.com>
Thu, 12 Dec 2013 14:02:19 +0000 (15:02 +0100)
committerMarek Kasik <mkasik@redhat.com>
Mon, 16 Dec 2013 16:58:04 +0000 (17:58 +0100)
commit1b032b18cc992d98fa128051636e7cdd404664e3
treede041c8c1ab737eafbab3c605d09af9ad5464eca
parentbfd27445e6eb66fa5448e333990aba8a26d22882
gdkwindow: Handle references in "update_windows" list correctly

Since update_windows list is a static variable in GdkWindow.c which
contains pointers to windows which needs to be updated, it can happen
that it contains a pointer to a window even after quit from a gtk_main().
If another gtk_main() is called in the same process it tries to process
windows in the list which leads to a crash.
Correct reference count handling of added windows prevents such applications
from crash.

https://bugzilla.gnome.org/show_bug.cgi?id=711552
gdk/gdkwindow.c